import traceback
if __name__ == '__main__':
   try:
      class_hour=int(input("输入总课时："))
      class_num=int(input("输入课程数："))
      #自定义异常
      if class_hour <100:
         raise ValueError("课时太少：总课时必须大于等于100")
      print("总课时是：",class_hour,"课程数：",class_num)

      avr=class_hour/class_num
      print("平均课时:%.2f"%avr)

   except ZeroDivisionError as e:

       print("课时数不能为0")

   except ValueError as e:
       if "课时太少：总课时必须大于等于100"==str(e):
          print("总课时必须大于100！")
       else:
          print("输入值不为0")
   except Exception as e:
       print("存在其他问题！")




